/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.msk.base.domain.goods.Goods;
import com.msk.common.utils.DictUtils;
import com.msk.sys.domain.DataEntity;
import com.msk.sys.domain.Office;
import com.msk.wlhy.domain.HtDriverFile;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * @author llh
 * @date 2023/5/10
 * @return 
 * @description 推送价格表Entity      
 */
public class PriceCompare extends DataEntity<PriceCompare> {
	
	private static final long serialVersionUID = 1L;
	private Goods goods;
	private HtDriverFile htDriverFile ;
	private Double driverPriceOffer;
	private String attstr01;
	private String attstr02;
	private String attstr03;
	private String attstr04;
	private Date attdate01;
	private Date attdate02;
	private String delFlagAlias;		// 转换后的del_flag
	
	private Office company;
    private Office office;
    
    private String offerStatus;
    
    private Double officialPriceOffer;
    
    private Double driverTatolOffer;
    private Double officialTatolOffer;
    
    private String ofterType;
    
    private String offerStatusAlias;//比价单状态转换类型
    
    private String ofterTypeAlias;//报价类型 0：单价；1：总价

	private String offerFlag; //报价标志用于查看自己报价和已中标的报价

	private String offerUser; //报价人用于查看自己报价和已中标的报价

	private String approveFile;

	public PriceCompare() {
		super();
	}

	public PriceCompare(String id){
		super(id);
	}

	
		

	public String getOfterType() {
		return ofterType;
	}

	public void setOfterType(String ofterType) {
		this.ofterType = ofterType;
	}

	public String getOfterTypeAlias() {
		if(StringUtils.isBlank(ofterTypeAlias)){
			return DictUtils.getDictLabel(ofterType, "base_price_ofter_type", "");
		}
		return ofterTypeAlias;
	}

	public void setOfterTypeAlias(String ofterTypeAlias) {
		this.ofterTypeAlias = ofterTypeAlias;
	}

	public String getOfferStatusAlias() {
		if(StringUtils.isBlank(offerStatusAlias)){
			return DictUtils.getDictLabel(offerStatus, "base_price_compare_status", "");
		}
		return offerStatusAlias;
	}

	public void setOfferStatusAlias(String offerStatusAlias) {
		this.offerStatusAlias = offerStatusAlias;
	}

	public String getOfferStatus() {
		return offerStatus;
	}

	public void setOfferStatus(String offerStatus) {
		this.offerStatus = offerStatus;
	}

	public Office getCompany() {
		return company;
	}

	public void setCompany(Office company) {
		this.company = company;
	}

	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}


	public HtDriverFile getHtDriverFile() {
		return htDriverFile;
	}

	public void setHtDriverFile(HtDriverFile htDriverFile) {
		this.htDriverFile = htDriverFile;
	}


	
	

	public Double getDriverTatolOffer() {
		return driverTatolOffer;
	}

	public void setDriverTatolOffer(Double driverTatolOffer) {
		this.driverTatolOffer = driverTatolOffer;
	}

	public Double getOfficialTatolOffer() {
		if(officialTatolOffer==null || "".equals(officialTatolOffer)){
			return 0.0;
		}
		return officialTatolOffer;
	}

	public void setOfficialTatolOffer(Double officialTatolOffer) {
		this.officialTatolOffer = officialTatolOffer;
	}

	public Double getDriverPriceOffer() {
		return driverPriceOffer;
	}

	public void setDriverPriceOffer(Double driverPriceOffer) {
		this.driverPriceOffer = driverPriceOffer;
	}

	public Double getOfficialPriceOffer() {
		if(officialPriceOffer==null || "".equals(officialPriceOffer)){
			return 0.0;
		}
		return officialPriceOffer;
	}

	public void setOfficialPriceOffer(Double officialPriceOffer) {
		this.officialPriceOffer = officialPriceOffer;
	}

	@Length(min=0, max=200, message="attstr01长度必须介于 0 和 200 之间")
	public String getAttstr01() {
		return attstr01;
	}

	public void setAttstr01(String attstr01) {
		this.attstr01 = attstr01;
	}
	
	@Length(min=0, max=200, message="attstr02长度必须介于 0 和 200 之间")
	public String getAttstr02() {
		return attstr02;
	}

	public void setAttstr02(String attstr02) {
		this.attstr02 = attstr02;
	}
	
	@Length(min=0, max=200, message="attstr03长度必须介于 0 和 200 之间")
	public String getAttstr03() {
		return attstr03;
	}

	public void setAttstr03(String attstr03) {
		this.attstr03 = attstr03;
	}
	
	@Length(min=0, max=200, message="attstr04长度必须介于 0 和 200 之间")
	public String getAttstr04() {
		return attstr04;
	}

	public void setAttstr04(String attstr04) {
		this.attstr04 = attstr04;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttdate01() {
		return attdate01;
	}

	public void setAttdate01(Date attdate01) {
		this.attdate01 = attdate01;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttdate02() {
		return attdate02;
	}

	public void setAttdate02(Date attdate02) {
		this.attdate02 = attdate02;
	}
	
	
	public String getDelFlagAlias() {
		if(StringUtils.isBlank(delFlagAlias)){
			return DictUtils.getDictLabel(delFlag, "del_flag", "");
		}
		return delFlagAlias;
	}

	public void setDelFlagAlias(String delFlagAlias) {
		this.delFlagAlias = delFlagAlias;
	}
	
	public String getLogTitle() {
		return "推送价格表";
	}
	
//	public String getLogType() {
//		return Log.LogType.module_operate.name();
//	}

	public String getOfferFlag() {
		return offerFlag;
	}

	public void setOfferFlag(String offerFlag) {
		this.offerFlag = offerFlag;
	}

	public String getOfferUser() {
		return offerUser;
	}

	public void setOfferUser(String offerUser) {
		this.offerUser = offerUser;
	}

	public String getApproveFile() {
		return approveFile;
	}

	public void setApproveFile(String approveFile) {
		this.approveFile = approveFile;
	}
}